package com.example;

public class Student {
    /* 类的属性，承接对象的属性信息 */
    int a;
    /* static修饰的属性，不能由对象来访问 */
    static int b;
    static String className = "学生";

    public void fun1() {
        this.a = 2;
        b = 2;
        System.out.println("执行了");
        fun2();
    }

    public static void main(String[] args) {
        b = 2;
        new Student().a = 1;
        fun2();
        new Student().fun1();
    }

    /* static修饰的方法优先加载进内存 */
    public static void fun2() {

    }
}
